package com.qyhl.webtv.commonlib.utils.view.gridviewpager;

import android.view.View;
import android.widget.AdapterView;
import android.widget.BaseAdapter;

import java.util.List;

/**
 * Created by Cookie on 2017/1/16.
 */

public abstract class GridViewPagerDataAdapter<T> {
    public List listAll;

    public int rowInOnePage;

    public int columnInOnePage;

    /**
     *
     * @param listAll    数据源
     * @param rowInOnePage   每页显示的行数
     * @param columnInOnePage  每页显示的列数
     */
    public GridViewPagerDataAdapter(List<T> listAll, int rowInOnePage, int columnInOnePage) {

        this.listAll = listAll;

        this.rowInOnePage = rowInOnePage;

        this.columnInOnePage = columnInOnePage;

    }

    public abstract BaseAdapter getGridViewAdapter(List<T> currentList, int pageIndex);


    public abstract void onItemClick(AdapterView<?> parent, View view, int position, long id, int pageIndex);
}
